package com.smart.manager.pop.entities.body;


import com.smart.common.entities.core.BaseSearch;
import com.smart.manager.pop.entities.assembler.Reward;
import com.smart.manager.pop.entities.enums.HdNature;
import com.smart.manager.pop.entities.enums.HdState;
import com.smart.manager.pop.entities.enums.RegisterKind;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 支付中心-支付宝配置
 *
 * @author Administrator
 * @date 2022/10/31
 */

public class RActivityMain {


    /**
     * 支付订单搜索条件
     *
     * @author xiaxuqiu
     * @date 2022/10/17
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel("RActivityRegister1")
    public static class SearchBody extends BaseSearch {
        @ApiModelProperty(value = "活动标题")
        private String title;
 

        @ApiModelProperty(value = "活动状态")

        private HdState state;

    }


    @Data

    @ApiModel("RActivityRegister2")
    public static class EditBody implements Serializable {

        @ApiModelProperty(value = "活动标题")
        @NotBlank(message = "活动标题 不能为空")
        @Length(max = 50 ,message = "活动标题 不能超过50个字符")
        private String title;

        @ApiModelProperty(value = "活动描述")
        @NotBlank(message = "活动描述 不能为空")
        @Length(max = 200 ,message = "活动描述 不能超过50个字符")
        private String description;



        @ApiModelProperty(value = "活动性质")
        @NotNull(message = "活动性质 不能为空")
        private HdNature nature;

        @ApiModelProperty(value = "活动状态")
        @NotNull(message = "活动状态 不能为空")
        private HdState state;


        @ApiModelProperty(value = "活动分类")
        private RegisterKind kind;

        @ApiModelProperty(value = "使用素材")
        @NotNull(message = "关联海报 不能为空")
        private Long posterId;

        @ApiModelProperty(value = "关联链接")
        @NotNull(message = "关联链接 不能为空")
        private Long linkId;


        @ApiModelProperty(value = "活动奖励")
        @NotNull(message = "活动奖励 不能为空")
        @Valid
        private Reward reward ;
    }


}
